package com.jeesite.modules.my.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.my.entity.MyUsers;
import com.jeesite.modules.my.dao.MyUsersDao;

/**
 * my_usersService
 * @author ccz
 * @version 2025-03-20
 */
@Service
public class MyUsersService extends CrudService<MyUsersDao, MyUsers> {
	
	/**
	 * 获取单条数据
	 * @param myUsers
	 * @return
	 */
	@Override
	public MyUsers get(MyUsers myUsers) {
		return super.get(myUsers);
	}
	
	/**
	 * 查询分页数据
	 * @param myUsers 查询条件
	 * @param myUsers.page 分页对象
	 * @return
	 */
	@Override
	public Page<MyUsers> findPage(MyUsers myUsers) {
		return super.findPage(myUsers);
	}
	
	/**
	 * 查询列表数据
	 * @param myUsers
	 * @return
	 */
	@Override
	public List<MyUsers> findList(MyUsers myUsers) {
		return super.findList(myUsers);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param myUsers
	 */
	@Override
	@Transactional
	public void save(MyUsers myUsers) {
		super.save(myUsers);
	}
	
	/**
	 * 更新状态
	 * @param myUsers
	 */
	@Override
	@Transactional
	public void updateStatus(MyUsers myUsers) {
		super.updateStatus(myUsers);
	}
	
	/**
	 * 删除数据
	 * @param myUsers
	 */
	@Override
	@Transactional
	public void delete(MyUsers myUsers) {
		super.delete(myUsers);
	}






	@Autowired
	private MyUsersDao myUsersMapper;

	// 根据地区ID查询用户
	public List<MyUsers> findByRegionId(String regionId) {
		return myUsersMapper.findByRegionId(regionId);
	}
}